<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
  <title>众茶国际</title>

  <script src="../vueJS/vue.js"></script>  
  <!-- 引入样式 -->
  <link rel="stylesheet" href="../ElementUI/index.css">
  <!-- 引入组件库 -->
  <script src="../ElementUI/index.js"></script>
</head>
<body>
  <div id="app">
    <!-- <div>{{ code }}</div>
    <div>{{ memberId }}</div> -->
  </div>
</body>

<script type="text/javascript">
  new Vue({
    el:'#app',
    data:{
      code: '',
      memberId: '',
    },
    computed: {},
    watch: {},
    methods: {
      GetUrlParam(name) {
        // 用该属性获取页面 URL 地址从问号 (?) 开始的 URL（查询部分）
        var url = window.location.search;
        // 正则筛选地址栏
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        // 匹配目标参数
        var result = url.substr(1).match(reg);
        //返回参数值
        return result ? decodeURIComponent(result[2]) : null;
      }
    },
    created() {
      this.memberId = this.GetUrlParam("H5PayCode");
      this.code = this.GetUrlParam("auth_code");

      let url = "http://zcgj-api.utea88.com/front/zfb/zfbLogin?code=" + this.code + "&memberId=" + this.memberId
      window.location.href = url
      
    },
    mounted() {
      
    },
  })
</script>

<style lang='scss' scoped>
  
</style>
</html>